<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Classificados</title>
</head>
<body>
<f:view>
<h2>Classificados:</h2>
		<h:dataTable border="1" value="#{classificados.listaAnuncios}" var="anuncio">
			<h:column id="column1">
				<h:outputText value="#{anuncio.descricao}"></h:outputText>
				<f:facet name="header">
					<h:outputText value="Descrição do Anúncio"></h:outputText>
				</f:facet>
			</h:column>
			<h:column id="column2"><h:form>
					<h:commandLink action="#{classificados.atualizarAnuncioDetalhado}">
						<h:outputText value="Ver detalhes"></h:outputText>
							<f:param name="idAnuncioDetalhado" value="#{anuncio.id}" />
					</h:commandLink>
				</h:form>
				<f:facet name="header">
					<h:outputText value="Ação"></h:outputText>
				</f:facet>
			</h:column>
		</h:dataTable>
	</f:view>
</body>
</html>